package com.yanmaohu.yulia.statement;

import com.yanmaohu.yulia.bean.RoleSpecification;

/**
 * @author Bright Lee
 */
public final class SetRoleStatement implements SqlSessionStatement, Statement {

    private int beginIndex;
    private int endIndex;
    private RoleSpecification roleSpecification;

    public SetRoleStatement(int beginIndex, RoleSpecification roleSpecification) {
        this.beginIndex = beginIndex;
        this.endIndex = roleSpecification.getEndIndex();
        this.roleSpecification = roleSpecification;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public RoleSpecification getRoleSpecification() {
        return roleSpecification;
    }

}
